/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.infoweblogic.pojos;

import br.com.pbs.interfaces.Bean;
import br.com.pbs.pojos.Aluno;
import java.util.LinkedList;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

/**
 *
 * @author Luiz Segundo
 */
@Entity
public class AlunoDisciplina implements Bean{

        @Id
        @GeneratedValue(strategy=GenerationType.AUTO)
        private Long id;

        @OneToOne
        private Disciplina disciplina;

        @ManyToOne
        private Aluno aluno;

        @OneToMany(fetch=FetchType.LAZY)
        private List<Double> notas = new LinkedList<Double>();

        @Column
        private String ano;

        public Aluno getAluno() {
                return aluno;
        }

        public void setAluno(Aluno aluno) {
                this.aluno = aluno;
        }

        public String getAno() {
                return ano;
        }

        public void setAno(String ano) {
                this.ano = ano;
        }

        public Disciplina getDisciplina() {
                return disciplina;
        }

        public void setDisciplina(Disciplina disciplina) {
                this.disciplina = disciplina;
        }

        public List<Double> getNotas() {
                return notas;
        }

        public void setNotas(List<Double> notas) {
                this.notas = notas;
        }

        public Long getId() {
                return id;
        }

        public void setId(Long id) {
                this.id = id;
        }

}
